System and method for scalable multi-homed routing for vswitch based hca virtualization

ABSTRACT

Systems and methods are provided for supporting scalable multi-homed routing for virtual switch based host channel adapter (HCA) virtualization in a subnet. An exemplary method can provide one or more switches, a plurality of host channel adapters, a plurality of hypervisors, and a plurality of virtual machines. The method can arrange the plurality of host channel adapters with one or more of a virtual switch with prepopulated local identifiers (LIDs) architecture or a virtual switch with dynamic LID assignment architecture. The method can further perform a multi-homed routing for the subnet, wherein at least one of the plurality of host channel adapters comprises two virtual switches, wherein the two virtual switches are treated as endpoints of the subnet, and wherein the multi-homed routing for the subnet ensures that each the two virtual switches are routed through independent paths.

CLAIM OF PRIORITY AND CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and claims the benefit of priorityto U.S. patent application entitled “SYSTEM AND METHOD FOR SCALABLEMULTI-HOMED ROUTING FOR vSWITCH BASED HCA VIRTUALIZATION”, applicationSer. No. 16/512,069, filed on Jul. 15, 2019, which application is acontinuation of and claims the benefit of priority to U.S. patentapplication entitled “SYSTEM AND METHOD FOR SCALABLE MULTI-HOMED ROUTINGFOR vSWITCH BASED HCA VIRTUALIZATION”, application Ser. No. 15/295,825,filed on Oct. 17, 2016, which application claims the benefit of priorityto U.S. Provisional Patent Application entitled “SYSTEM AND METHOD FORSCALABLE MULTI-HOMED ROUTING FOR vSWITCH BASED HCA VIRTUALIZATION”,Application No. 62/252,255, filed on Nov. 6, 2015; this application isrelated to U.S. patent application entitled “SYSTEM AND METHOD FORSUPPORTING MULTI-HOMED FAT-TREE ROUTING IN A MIDDLEWARE MACHINEENVIRONMENT”, application Ser. No. 14/226,288, filed Mar. 26, 2014; andU.S. patent application entitled “SYSTEM AND METHOD SYSTEM AND METHODFOR PROVIDING AN INFINIBAND SR-IOV vSWITCH ARCHITECTURE FOR A HIGHPERFORMANCE CLOUD COMPUTING ENVIRONMENT,” application Ser. No.15/050,901, filed Feb. 23, 2016, each of which applications are hereinincorporated by reference in their entirety.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

FIELD OF INVENTION

The present invention is generally related to computer systems, and isparticularly related to supporting computer system virtualization andlive migration using SR-IOV vSwitch architecture.

BACKGROUND

As larger cloud computing architectures are introduced, the performanceand administrative bottlenecks associated with the traditional networkand storage have become a significant problem. There has been anincreased interest in using InfiniBand (IB) technology as the foundationfor a cloud computing fabric. This is the general area that embodimentsof the invention are intended to address.

SUMMARY

Described herein are systems and methods for supporting scalablemulti-homed routing for virtual switch based host channel adapter (HCA)virtualization in a subnet. An exemplary method can provide, at one ormore computers, including one or more microprocessors, one or moreswitches, the one or more switches comprising at least a leaf switch,wherein each of the one or more switches comprise a plurality of ports;a plurality of host channel adapters, wherein one or more of theplurality of host channel adapters comprise at least one virtualfunction, and wherein the plurality of host channel adapters areinterconnected via the one or more switches; a plurality of hypervisors,wherein each of the one or more hypervisors are associated with at leastone host channel adapter of the one or more host channel adapters thatcomprise at least one virtual function; and a plurality of virtualmachines, wherein each of the plurality of virtual machines areassociated with at least one virtual function. The method can arrangethe plurality of host channel adapters that comprise at least onevirtual function with one or more of a virtual switch with prepopulatedlocal identifiers (LIDs) architecture or a virtual switch with dynamicLID assignment architecture. The method can also perform a multi-homedrouting for the subnet; wherein at least one of the plurality of hostchannel adapters that comprise at least one virtual function comprisestwo virtual switches, wherein the two virtual switches are treated asendpoints of the subnet; and wherein the multi-homed routing for thesubnet ensures that each the two virtual switches are routed throughindependent paths.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 shows an illustration of an InfiniBand environment, in accordancewith an embodiment.

FIG. 2 shows an illustration of a tree topology in a networkenvironment, accordance with an embodiment.

FIG. 3 shows an exemplary shared port architecture, in accordance withan embodiment.

FIG. 4 shows an exemplary vSwitch architecture, in accordance with anembodiment.

FIG. 5 shows an exemplary vSwitch architecture with prepopulated LIDs,in accordance with an embodiment.

FIG. 6 shows an exemplary vSwitch architecture with dynamic LIDassignment, in accordance with an embodiment.

FIG. 7 shows an exemplary vSwitch architecture with vSwitch with dynamicLID assignment and prepopulated LIDs, in accordance with an embodiment.

FIG. 8 shows an exemplary vSwitch architecture with prepopulated LIDsprior to a virtual machine migration, in accordance with an embodiment.

FIG. 9 shows an exemplary vSwitch architecture with prepopulated LIDsafter a virtual machine migration, in accordance with an embodiment.

FIG. 10 shows an exemplary vSwitch architecture with prepopulated LIDswith potential virtual machine migration paths, in accordance with anembodiment.

FIG. 11 shows an illustration of supporting scalable multi-homed routingfor vSwitch based HCA virtualization, in accordance with an embodimentof the invention.

FIG. 12 is a flow chart of a method for supporting scalable multi-homedrouting for virtual switch based host channel adapter (HCA)virtualization in a subnet, in accordance with an embodiment.

DETAILED DESCRIPTION

The invention is illustrated, by way of example and not by way oflimitation, in the figures of the accompanying drawings in which likereferences indicate similar elements. It should be noted that referencesto “an” or “one” or “some” embodiment(s) in this disclosure are notnecessarily to the same embodiment, and such references mean at leastone. While specific implementations are discussed, it is understood thatthe specific implementations are provided for illustrative purposesonly. A person skilled in the relevant art will recognize that othercomponents and configurations may be used without departing from thescope and spirit of the invention.

Common reference numerals can be used to indicate like elementsthroughout the drawings and detailed description; therefore, referencenumerals used in a figure may or may not be referenced in the detaileddescription specific to such figure if the element is describedelsewhere.

Described herein are systems and methods for supporting scalablemulti-homed routing for virtual switch based host channel adapter (HCA)virtualization in a subnet.

The following description of the invention uses an InfiniBand™ (IB)network as an example for a high performance network. It will beapparent to those skilled in the art that other types of highperformance networks can be used without limitation. The followingdescription also uses the fat-tree topology as an example for a fabrictopology. It will be apparent to those skilled in the art that othertypes of fabric topologies can be used without limitation.

In accordance with an embodiment of the invention, virtualization can bebeneficial to efficient resource utilization and elastic resourceallocation in cloud computing. Live migration makes it possible tooptimize resource usage by moving virtual machines (VMs) betweenphysical servers in an application transparent manner. Thus,virtualization can enable consolidation, on-demand provisioning ofresources, and elasticity through live migration.

InfiniBand™

InfiniBand™ (IB) is an open standard lossless network technologydeveloped by the InfiniBand™ Trade Association. The technology is basedon a serial point-to-point full-duplex interconnect that offers highthroughput and low latency communication, geared particularly towardshigh-performance computing (HPC) applications and datacenters.

The InfiniBand™ Architecture (IBA) supports a two-layer topologicaldivision. At the lower layer, IB networks are referred to as subnets,where a subnet can include a set of hosts interconnected using switchesand point-to-point links. At the higher level, an IB fabric constitutesone or more subnets, which can be interconnected using routers.

Within a subnet, hosts can be connected using switches andpoint-to-point links. Additionally, there can be a master managemententity, the subnet manager (SM), which resides on a designated subnetdevice in the subnet. The subnet manager is responsible for configuring,activating and maintaining the IB subnet. Additionally, the subnetmanager (SM) can be responsible for performing routing tablecalculations in an IB fabric. Here, for example, the routing of the IBnetwork aims at proper load balancing between all source and destinationpairs in the local subnet.

Through the subnet management interface, the subnet manager exchangescontrol packets, which are referred to as subnet management packets(SMPs), with subnet management agents (SMAs). The subnet managementagents reside on every IB subnet device. By using SMPs, the subnetmanager is able to discover the fabric, configure end nodes andswitches, and receive notifications from SMAs.

In accordance with an embodiment, inter- and intra-subnet routing in anIB network can be based on LFTs stored in the switches. The LFTs arecalculated by the SM according to the routing mechanism in use. In asubnet, Host Channel Adapter (HCA) ports on the end nodes and switchesare addressed using local identifiers (LIDs). Each entry in an LFTconsists of a destination LID (DLID) and an output port. Only one entryper LID in the table is supported. When a packet arrives at a switch,its output port is determined by looking up the DLID in the forwardingtable of the switch. The routing is deterministic as packets take thesame path in the network between a given source-destination pair (LIDpair).

Generally, all other subnet managers, excepting the master subnetmanager, act in standby mode for fault-tolerance. In a situation where amaster subnet manager fails, however, a new master subnet manager isnegotiated by the standby subnet managers. The master subnet manageralso performs periodic sweeps of the subnet to detect any topologychanges and reconfigure the network accordingly.

Furthermore, hosts and switches within a subnet can be addressed usinglocal identifiers (LIDs), and a single subnet can be limited to 49151unicast LIDs. Besides the LIDs, which are the local addresses that arevalid within a subnet, each IB device can have a 64-bit global uniqueidentifier (GUID). A GUID can be used to form a global identifier (GID),which is an IB layer three (L3) address.

The SM can calculate routing tables (i.e., the connections/routesbetween each pair of nodes within the subnet) at network initializationtime. Furthermore, the routing tables can be updated whenever thetopology changes, in order to ensure connectivity and optimalperformance. During normal operations, the SM can perform periodic lightsweeps of the network to check for topology changes. If a change isdiscovered during a light sweep or if a message (trap) signaling anetwork change is received by the SM, the SM can reconfigure the networkaccording to the discovered changes.

For example, the SM can reconfigure the network when the networktopology changes, such as when a link goes down, when a device is added,or when a link is removed. The reconfiguration steps can include thesteps performed during the network initialization. Furthermore, thereconfigurations can have a local scope that is limited to the subnets,in which the network changes occurred. Also, the segmenting of a largefabric with routers may limit the reconfiguration scope.

In accordance with an embodiment, IB networks can support partitioningas a security mechanism to provide for isolation of logical groups ofsystems sharing a network fabric. Each HCA port on a node in the fabriccan be a member of one or more partitions. Partition memberships aremanaged by a centralized partition manager, which can be part of the SM.The SM can configure partition membership information on each port as atable of 16-bit partition keys (P Keys). The SM can also configureswitches and routers with the partition enforcement tables containing PKey information associated with the LIDs. Additionally, in a generalcase, partition membership of a switch port can represent a union of allmembership indirectly associated with LIDs routed via the port in anegress (towards the link) direction.

In accordance with an embodiment, for the communication between nodes,Queue Pairs (QPs) and End-to-End contexts (EECs) can be assigned to aparticular partition, except for the management Queue Pairs (QP0 andQP1). The P Key information can then be added to every IB transportpacket sent. When a packet arrives at an HCA port or a switch, its P Keyvalue can be validated against a table configured by the SM. If aninvalid P Key value is found, the packet is discarded immediately. Inthis way, communication is allowed only between ports sharing apartition.

An example InfiniBand fabric is shown in FIG. 1, which shows anillustration of an InfiniBand environment 100, in accordance with anembodiment. In the example shown in FIG. 1, nodes A-E, 101-105, use theInfiniBand fabric, 120, to communicate, via the respective host channeladapters 111-115. In accordance with an embodiment, the various nodes,e.g., nodes A-E, 101-105, can be represented by various physicaldevices. In accordance with an embodiment, the various nodes, e.g.,nodes A-E, 101-105, can be represented by various virtual devices, suchas virtual machines.

Virtual Machines in InfiniBand

During the last decade, the prospect of virtualized High PerformanceComputing (HPC) environments has improved considerably as CPU overheadhas been practically removed through hardware virtualization support;memory overhead has been significantly reduced by virtualizing theMemory Management Unit; storage overhead has been reduced by the use offast SAN storages or distributed networked file systems; and network I/Ooverhead has been reduced by the use of device passthrough techniqueslike Single Root Input/Output Virtualization (SR-IOV). It is nowpossible for clouds to accommodate virtual HPC (vHPC) clusters usinghigh performance interconnect solutions and deliver the necessaryperformance.

However, when coupled with lossless networks, such as InfiniBand (IB),certain cloud functionality, such as live migration of virtual machines(VMs), still remains an issue due to the complicated addressing androuting schemes used in these solutions. IB is an interconnectionnetwork technology offering high bandwidth and low latency, thus, isvery well suited for HPC and other communication intensive workloads.

The traditional approach for connecting IB devices to VMs is byutilizing SR-IOV with direct assignment. However, to achieve livemigration of VMs assigned with IB Host Channel Adapters (HCAs) usingSR-IOV has proved to be challenging. Each IB connected node has threedifferent addresses: LID, GUID, and GID. When a live migration happens,one or more of these addresses change. Other nodes communicating withthe VM-in-migration can lose connectivity. When this happens, the lostconnection can be attempted to be renewed by locating the virtualmachine's new address to reconnect to by sending Subnet Administration(SA) path record queries to the IB Subnet Manager (SM).

IB uses three different types of addresses. A first type of address isthe 16 bits Local Identifier (LID). At least one unique LID is assignedto each HCA port and each switch by the SM. The LIDs are used to routetraffic within a subnet. Since the LID is 16 bits long, 65536 uniqueaddress combinations can be made, of which only 49151 (0x0001-0xBFFF)can be used as unicast addresses. Consequently, the number of availableunicast addresses defines the maximum size of an IB subnet. A secondtype of address is the 64 bits Global Unique Identifier (GUID) assignedby the manufacturer to each device (e.g. HCAs and switches) and each HCAport. The SM may assign additional subnet unique GUIDs to an HCA port,which is useful when SR-IOV is used. A third type of address is the 128bits Global Identifier (GID). The GID is a valid IPv6 unicast address,and at least one is assigned to each HCA port. The GID is formed bycombining a globally unique 64 bits prefix assigned by the fabricadministrator, and the GUID address of each HCA port.

Fat-Tree (FTree) Topologies and Routing

In accordance with an embodiment, some of the IB based HPC systemsemploy a fat-tree topology to take advantage of the useful propertiesfat-trees offer. These properties include full bisection-bandwidth andinherent fault-tolerance due to the availability of multiple pathsbetween each source destination pair. The initial idea behind fat-treeswas to employ fatter links between nodes, with more available bandwidth,as the tree moves towards the roots of the topology. The fatter linkscan help to avoid congestion in the upper-level switches and thebisection-bandwidth is maintained.

FIG. 2 shows an illustration of a tree topology in a networkenvironment, in accordance with an embodiment. As shown in FIG. 2, oneor more end nodes 201-204 can be connected in a network fabric 200. Thenetwork fabric 200 can be based on a fat-tree topology, which includes aplurality of leaf switches 211-214, and multiple spine switches or rootswitches 231-234. Additionally, the network fabric 200 can include oneor more intermediate switches, such as switches 221-224.

Also as shown in FIG. 2, each of the end nodes 201-204 can be amulti-homed node, i.e., a single node that is connected to two or moreparts of the network fabric 200 through multiple ports. For example, thenode 201 can include the ports H1 and H2, the node 202 can include theports H3 and H4, the node 203 can include the ports H5 and H6, and thenode 204 can include the ports H7 and H8.

Additionally, each switch can have multiple switch ports. For example,the root switch 231 can have the switch ports 1-2, the root switch 232can have the switch ports 3-4, the root switch 233 can have the switchports 5-6, and the root switch 234 can have the switch ports 7-8.

In accordance with an embodiment, the fat-tree routing mechanism is oneof the most popular routing algorithm for IB based fat-tree topologies.The fat-tree routing mechanism is also implemented in the OFED (OpenFabric Enterprise Distribution—a standard software stack for buildingand deploying IB based applications) subnet manager, OpenSM.

The fat-tree routing mechanism aims to generate LFTs that evenly spreadshortest-path routes across the links in the network fabric. Themechanism traverses the fabric in the indexing order and assigns targetLIDs of the end nodes, and thus the corresponding routes, to each switchport. For the end nodes connected to the same leaf switch, the indexingorder can depend on the switch port to which the end node is connected(i.e., port numbering sequence). For each port, the mechanism canmaintain a port usage counter, and can use this port usage counter toselect a least-used port each time a new route is added.

In accordance with an embodiment, in a partitioned subnet, nodes thatare not members of a common partition are not allowed to communicate.Practically, this means that some of the routes assigned by the fat-treerouting algorithm are not used for the user traffic. The problem ariseswhen the fat tree routing mechanism generates LFTs for those routes thesame way it does for the other functional paths. This behavior canresult in degraded balancing on the links, as nodes are routed in theorder of indexing. As routing is done oblivious to the partitions,fat-tree routed subnets, in general, provide poor isolation amongpartitions.

Input/Output (I/O) Virtualization

In accordance with an embodiment, I/O Virtualization (IOV) can provideavailability of I/O by allowing virtual machines (VMs) to access theunderlying physical resources. The combination of storage traffic andinter-server communication impose an increased load that may overwhelmthe I/O resources of a single server, leading to backlogs and idleprocessors as they are waiting for data. With the increase in number ofI/O requests, IOV can provide availability; and can improve performance,scalability and flexibility of the (virtualized) I/O resources to matchthe level of performance seen in modern CPU virtualization.

In accordance with an embodiment, IOV is desired as it can allow sharingof I/O resources and provide protected access to the resources from theVMs. IOV decouples a logical device, which is exposed to a VM, from itsphysical implementation. Currently, there can be different types of IOVtechnologies, such as emulation, paravirtualization, direct assignment(DA), and single root-I/O virtualization (SR-IOV).

In accordance with an embodiment, one type of IOV technology is softwareemulation. Software emulation can allow for a decoupledfront-end/back-end software architecture. The front-end can be a devicedriver placed in the VM, communicating with the back-end implemented bya hypervisor to provide I/O access. The physical device sharing ratio ishigh and live migrations of VMs are possible with just a fewmilliseconds of network downtime. However, software emulation introducesadditional, undesired computational overhead.

In accordance with an embodiment, another type of IOV technology isdirect device assignment. Direct device assignment involves a couplingof I/O devices to VMs, with no device sharing between VMs. Directassignment, or device passthrough, provides near to native performancewith minimum overhead. The physical device bypasses the hypervisor andis directly attached to the VM. However, a downside of such directdevice assignment is limited scalability, as there is no sharing amongvirtual machines—one physical network card is coupled with one VM.

In accordance with an embodiment, Single Root IOV (SR-IOV) can allow aphysical device to appear through hardware virtualization as multipleindependent lightweight instances of the same device. These instancescan be assigned to VMs as passthrough devices, and accessed as VirtualFunctions (VFs). The hypervisor accesses the device through a unique(per device), fully featured Physical Function (PF). SR-IOV eases thescalability issue of pure direct assignment. However, a problempresented by SR-IOV is that it can impair VM migration. Among these IOVtechnologies, SR-IOV can extend the PCI Express (PCIe) specificationwith the means to allow direct access to a single physical device frommultiple VMs while maintaining near to native performance. Thus, SR-IOVcan provide good performance and scalability.

SR-IOV allows a PCIe device to expose multiple virtual devices that canbe shared between multiple guests by allocating one virtual device toeach guest. Each SR-IOV device has at least one physical function (PF)and one or more associated virtual functions (VF). A PF is a normal PCIefunction controlled by the virtual machine monitor (VMM), or hypervisor,whereas a VF is a light-weight PCIe function. Each VF has its own baseaddress (BAR) and is assigned with a unique requester ID that enablesI/O memory management unit (IOMMU) to differentiate between the trafficstreams to/from different VFs. The IOMMU also apply memory and interrupttranslations between the PF and the VFs.

Unfortunately, however, direct device assignment techniques pose abarrier for cloud providers in situations where transparent livemigration of virtual machines is desired for data center optimization.The essence of live migration is that the memory contents of a VM arecopied to a remote hypervisor. Then the VM is paused at the sourcehypervisor, and the VM's operation is resumed at the destination. Whenusing software emulation methods, the network interfaces are virtual sotheir internal states are stored into the memory and get copied as well.Thus the downtime could be brought down to a few milliseconds.

However, migration becomes more difficult when direct device assignmenttechniques, such as SR-IOV, are used. In such situations, a completeinternal state of the network interface cannot be copied as it is tiedto the hardware. The SR-IOV VFs assigned to a VM are instead detached,the live migration will run, and a new VF will be attached at thedestination. In the case of InfiniBand and SR-IOV, this process canintroduce downtime in the order of seconds. Moreover, in an SR-IOVshared port model the addresses of the VM will change after themigration, causing additional overhead in the SM and a negative impacton the performance of the underlying network fabric.

InfiniBand SR-IOV Architecture—Shared Port

There can be different types of SR-IOV models, e.g. a shared port modeland a virtual switch model.

FIG. 3 shows an exemplary shared port architecture, in accordance withan embodiment. As depicted in the figure, a host 300 (e.g., a hostchannel adapter) can interact with a hypervisor 310, which can assignthe various virtual functions 330, 340, 350, to a number of virtualmachines. As well, the physical function can be handled by thehypervisor 310.

In accordance with an embodiment, when using a shared port architecture,such as that depicted in FIG. 3, the host, e.g., HCA, appears as asingle port in the network with a single shared LID and shared QueuePair (QP) space between the physical function 320 and the virtualfunctions 330, 350, 350. However, each function (i.e., physical functionand virtual functions) can have their own GID.

As shown in FIG. 3, in accordance with an embodiment, different GIDs canbe assigned to the virtual functions and the physical function, and thespecial queue pairs, QP0 and QP1 (i.e., special purpose queue pairs thatare used for InfiniBand management packets), are owned by the physicalfunction. These QPs are exposed to the VFs as well, but the VFs are notallowed to use QP0 (all SMPs coming from VFs towards QP0 are discarded),and QP1 can act as a proxy of the actual QP1 owned by the PF.

In accordance with an embodiment, the shared port architecture can allowfor highly scalable data centers that are not limited by the number ofVMs (which attach to the network by being assigned to the virtualfunctions), as the LID space is only consumed by physical machines andswitches in the network.

However, a shortcoming of the shared port architecture is the inabilityto provide transparent live migration, hindering the potential forflexible VM placement. As each LID is associated with a specifichypervisor, and shared among all VMs residing on the hypervisor, amigrating VM (i.e., a virtual machine migrating to a destinationhypervisor) has to have its LID changed to the LID of the destinationhypervisor. Furthermore, as a consequence of the restricted QP0 access,a subnet manager cannot run inside a VM.

InfiniBand SR-IOV Architecture Models—Virtual Switch (vSwitch)

There can be different types of SR-IOV models, e.g. a shared port modeland a virtual switch model.

FIG. 4 shows an exemplary vSwitch architecture, in accordance with anembodiment. As depicted in the figure, a host 400 (e.g., a host channeladapter) can interact with a hypervisor 410, which can assign thevarious virtual functions 430, 440, 450, to a number of virtualmachines. As well, the physical function can be handled by thehypervisor 410. A virtual switch 415 can also be handled by thehypervisor 401.

In accordance with an embodiment, in a vSwitch architecture each virtualfunction 430, 440, 450 is a complete virtual Host Channel Adapter(vHCA), meaning that the VM assigned to a VF is assigned a complete setof IB addresses (e.g., GID, GUID, LID) and a dedicated QP space in thehardware. For the rest of the network and the SM, the HCA 400 looks likea switch, via the virtual switch 415, with additional nodes connected toit. The hypervisor 410 can use the PF 420, and the VMs (attached to thevirtual functions) use the VFs.

In accordance with an embodiment, a vSwitch architecture providetransparent virtualization. However, because each virtual function isassigned a unique LID, the number of available LIDs gets consumedrapidly. As well, with many LID addresses in use (i.e., one each foreach physical function and each virtual function), more communicationpaths have to be computed by the SM and more Subnet Management Packets(SMPs) have to be sent to the switches in order to update their LFTs.For example, the computation of the communication paths might takeseveral minutes in large networks. Because LID space is limited to 49151unicast LIDs, and as each VM (via a VF), physical node, and switchoccupies one LID each, the number of physical nodes and switches in thenetwork limits the number of active VMs, and vice versa.

InfiniBand SR-IOV Architecture Models—vSwitch with Prepopulated LIDs

In accordance with an embodiment, the present disclosure provides asystem and method for providing a vSwitch architecture with prepopulatedLIDs.

FIG. 5 shows an exemplary vSwitch architecture with prepopulated LIDs,in accordance with an embodiment. As depicted in the figure, a number ofswitches 501-504 can provide communication within the network switchedenvironment 500 (e.g., an IB subnet) between members of a fabric, suchas an InfiniBand fabric. The fabric can include a number of hardwaredevices, such as host channel adapters 510, 520, 530. Each of the hostchannel adapters 510, 520, 530, can in turn interact with a hypervisor511, 521, and 531, respectively. Each hypervisor can, in turn, inconjunction with the host channel adapter it interacts with, setup andassign a number of virtual functions 514, 515, 516, 524, 525, 526, 534,535, 536, to a number of virtual machines. For example, virtual machine1 550 can be assigned by the hypervisor 511 to virtual function 1 514.Hypervisor 511 can additionally assign virtual machine 2 551 to virtualfunction 2 515, and virtual machine 3 552 to virtual function 3 516.Hypervisor 531 can, in turn, assign virtual machine 4 553 to virtualfunction 1 534. The hypervisors can access the host channel adaptersthrough a fully featured physical function 513, 523, 533, on each ofhost channel adapters.

In accordance with an embodiment, each of the switches 501-504 cancomprise a number of ports (not shown), which are used in setting alinear forwarding table in order to direct traffic within the networkswitched environment 500.

In accordance with an embodiment, the virtual switches 512, 522, and532, can be handled by their respective hypervisors 511, 521, 531. Insuch a vSwitch architecture each virtual function is a complete virtualHost Channel Adapter (vHCA), meaning that the VM assigned to a VF isassigned a complete set of IB addresses (e.g., GID, GUID, LID) and adedicated QP space in the hardware. For the rest of the network and theSM (not shown), the HCAs 510, 520, and 530 look like a switch, via thevirtual switches, with additional nodes connected to them.

In accordance with an embodiment, the present disclosure provides asystem and method for providing a vSwitch architecture with prepopulatedLIDs. Referring to FIG. 5, the LIDs are prepopulated to the variousphysical functions 513, 523, 533, as well as the virtual functions514-516, 524-526, 534-536 (even those virtual functions not currentlyassociated with an active virtual machine). For example, physicalfunction 513 is prepopulated with LID 1, while virtual function 1 534 isprepopulated with LID 10. The LIDs are prepopulated in an SR-IOVvSwitch-enabled subnet when the network is booted. Even when not all ofthe VFs are occupied by VMs in the network, the populated VFs areassigned with a LID as shown in FIG. 5.

In accordance with an embodiment, much like physical host channeladapters can have more than one port (two ports are common forredundancy), virtual HCAs can also be represented with two ports and beconnected via one, two or more virtual switches to the external IBsubnet.

In accordance with an embodiment, in a vSwitch architecture withprepopulated LIDs, each hypervisor can consume one LID for itselfthrough the PF and one more LID for each additional VF. The sum of allthe VFs available in all hypervisors in an IB subnet, gives the maximumamount of VMs that are allowed to run in the subnet. For example, in anIB subnet with 16 virtual functions per hypervisor in the subnet, theneach hypervisor consumes 17 LIDs (one LID for each of the 16 virtualfunctions plus one LID for the physical function) in the subnet. In suchan IB subnet, the theoretical hypervisor limit for a single subnet isruled by the number of available unicast LIDs and is: 2891 (49151available LIDs divided by 17 LIDs per hypervisor), and the total numberof VMs (i.e., the limit) is 46256 (2891 hypervisors times 16 VFs perhypervisor). (In actuality, these numbers are actually smaller sinceeach switch, router, or dedicated SM node in the IB subnet consumes aLID as well). Note that the vSwitch does not need to occupy anadditional LID as it can share the LID with the PF.

In accordance with an embodiment, in a vSwitch architecture withprepopulated LIDs, communication paths are computed for all the LIDsonce when the network is booted. When a new VM needs to be started thesystem does not have to add a new LID in the subnet, an action thatwould otherwise cause a complete reconfiguration of the network,including path recalculation, which is the most time consuming part.Instead, an available port for a VM is located (i.e., an availablevirtual function) in one of the hypervisors and the virtual machine isattached to the available virtual function.

In accordance with an embodiment, a vSwitch architecture withprepopulated LIDs also allows for the ability to calculate and usedifferent paths to reach different VMs hosted by the same hypervisor.Essentially, this allows for such subnets and networks to use aLID-Mask-Control-like (LMC-like) feature to provide alternative pathstowards one physical machine, without being bound by the limitation ofthe LMC that requires the LIDs to be sequential. The freedom to usenon-sequential LIDs is particularly useful when a VM needs to bemigrated and carry its associated LID to the destination.

In accordance with an embodiment, along with the benefits shown above ofa vSwitch architecture with prepopulated LIDs, certain considerationscan be taken into account. For example, because the LIDs areprepopulated in an SR-IOV vSwitch-enabled subnet when the network isbooted, the initial path computation (e.g., on boot-up) can take longerthan if the LIDs were not pre-populated.

InfiniBand SR-IOV Architecture Models—vSwitch with Dynamic LIDAssignment

In accordance with an embodiment, the present disclosure provides asystem and method for providing a vSwitch architecture with dynamic LIDassignment.

FIG. 6 shows an exemplary vSwitch architecture with dynamic LIDassignment, in accordance with an embodiment. As depicted in the figure,a number of switches 501-504 can provide communication within thenetwork switched environment 600 (e.g., an IB subnet) between members ofa fabric, such as an InfiniBand fabric. The fabric can include a numberof hardware devices, such as host channel adapters 510, 520, 530. Eachof the host channel adapters 510, 520, 530, can in turn interact with ahypervisor 511, 521, 531, respectively. Each hypervisor can, in turn, inconjunction with the host channel adapter it interacts with, setup andassign a number of virtual functions 514, 515, 516, 524, 525, 526, 534,535, 536, to a number of virtual machines. For example, virtual machine1 550 can be assigned by the hypervisor 511 to virtual function 1 514.Hypervisor 511 can additionally assign virtual machine 2 551 to virtualfunction 2 515, and virtual machine 3 552 to virtual function 3 516.Hypervisor 531 can, in turn, assign virtual machine 4 553 to virtualfunction 1 534. The hypervisors can access the host channel adaptersthrough a fully featured physical function 513, 523, 533, on each ofhost channel adapters.

In accordance with an embodiment, each of the switches 501-504 cancomprise a number of ports (not shown), which are used in setting alinear forwarding table in order to direct traffic within the networkswitched environment 600.

In accordance with an embodiment, the virtual switches 512, 522, and532, can be handled by their respective hypervisors 511, 521, 531. Insuch a vSwitch architecture each virtual function is a complete virtualHost Channel Adapter (vHCA), meaning that the VM assigned to a VF isassigned a complete set of IB addresses (e.g., GID, GUID, LID) and adedicated QP space in the hardware. For the rest of the network and theSM (not shown), the HCAs 510, 520, and 530 look like a switch, via thevirtual switches, with additional nodes connected to them.

In accordance with an embodiment, the present disclosure provides asystem and method for providing a vSwitch architecture with dynamic LIDassignment. Referring to FIG. 6, the LIDs are dynamically assigned tothe various physical functions 513, 523, 533, with physical function 513receiving LID 1, physical function 523 receiving LID 2, and physicalfunction 533 receiving LID 3. Those virtual functions that areassociated with an active virtual machine can also receive a dynamicallyassigned LID. For example, because virtual machine 1 550 is active andassociated with virtual function 1 514, virtual function 514 can beassigned LID 5. Likewise, virtual function 2 515, virtual function 3516, and virtual function 1 534 are each associated with an activevirtual function. Because of this, these virtual functions are assignedLIDs, with LID 7 being assigned to virtual function 2 515, LID 11 beingassigned to virtual function 3 516, and virtual function 9 beingassigned to virtual function 1 535. Unlike vSwitch with prepopulatedLIDs, those virtual functions not currently associated with an activevirtual machine do not receive a LID assignment.

In accordance with an embodiment, with the dynamic LID assignment, theinitial path computation can be substantially reduced. When the networkis booting for the first time and no VMs are present then a relativelysmall number of LIDs can be used for the initial path calculation andLFT distribution.

In accordance with an embodiment, much like physical host channeladapters can have more than one port (two ports are common forredundancy), virtual HCAs can also be represented with two ports and beconnected via one, two or more virtual switches to the external IBsubnet.

In accordance with an embodiment, when a new VM is created in a systemutilizing vSwitch with dynamic LID assignment, a free VM slot is foundin order to decide on which hypervisor to boot the newly added VM, and aunique non-used unicast LID is found as well. However, there are noknown paths in the network and the LFTs of the switches for handling thenewly added LID. Computing a new set of paths in order to handle thenewly added VM is not desirable in a dynamic environment where severalVMs may be booted every minute. In large IB subnets, computing a new setof routes can take several minutes, and this procedure would have torepeat each time a new VM is booted.

Advantageously, in accordance with an embodiment, because all the VFs ina hypervisor share the same uplink with the PF, there is no need tocompute a new set of routes. It is only needed to iterate through theLFTs of all the physical switches in the network, copy the forwardingport from the LID entry that belongs to the PF of the hypervisor—wherethe VM is created—to the newly added LID, and send a single SMP toupdate the corresponding LFT block of the particular switch. Thus thesystem and method avoids the need to compute a new set of routes

In accordance with an embodiment, the LIDs assigned in the vSwitch withdynamic LID assignment architecture do not have to be sequential. Whencomparing the LIDs assigned on VMs on each hypervisor in vSwitch withprepopulated LIDs versus vSwitch with dynamic LID assignment, it isnotable that the LIDs assigned in the dynamic LID assignmentarchitecture are non-sequential, while those prepopulated in aresequential in nature. In the vSwitch dynamic LID assignmentarchitecture, when a new VM is created, the next available LID is usedthroughout the lifetime of the VM. Conversely, in a vSwitch withprepopulated LIDs, each VM inherits the LID that is already assigned tothe corresponding VF, and in a network without live migrations, VMsconsecutively attached to a given VF get the same LID.

In accordance with an embodiment, the vSwitch with dynamic LIDassignment architecture can resolve the drawbacks of the vSwitch withprepopulated LIDs architecture model at a cost of some additionalnetwork and runtime SM overhead. Each time a VM is created, the LFTs ofthe physical switches in the subnet can be updated with the newly addedLID associated with the created VM. One subnet management packet (SMP)per switch is needed to be sent for this operation. The LMC-likefunctionality is also not available, because each VM is using the samepath as its host hypervisor. However, there is no limitation on thetotal amount of VFs present in all hypervisors, and the number of VFsmay exceed that of the unicast LID limit. Of course, not all of the VFsare allowed to be attached on active VMs simultaneously if this is thecase, but having more spare hypervisors and VFs adds flexibility fordisaster recovery and optimization of fragmented networks when operatingclose to the unicast LID limit.

InfiniBand SR-IOV Architecture Models—vSwitch with Dynamic LIDAssignment and Prepopulated LIDs

FIG. 7 shows an exemplary vSwitch architecture with vSwitch with dynamicLID assignment and prepopulated LIDs, in accordance with an embodiment.As depicted in the figure, a number of switches 501-504 can providecommunication within the network switched environment 500 (e.g., an IBsubnet) between members of a fabric, such as an InfiniBand fabric. Thefabric can include a number of hardware devices, such as host channeladapters 510, 520, 530. Each of the host channel adapters 510, 520, 530,can in turn interact with a hypervisor 511, 521, and 531, respectively.Each hypervisor can, in turn, in conjunction with the host channeladapter it interacts with, setup and assign a number of virtualfunctions 514, 515, 516, 524, 525, 526, 534, 535, 536, to a number ofvirtual machines. For example, virtual machine 1 550 can be assigned bythe hypervisor 511 to virtual function 1 514. Hypervisor 511 canadditionally assign virtual machine 2 551 to virtual function 2 515.Hypervisor 521 can assign virtual machine 3 552 to virtual function 3526. Hypervisor 531 can, in turn, assign virtual machine 4 553 tovirtual function 2 535. The hypervisors can access the host channeladapters through a fully featured physical function 513, 523, 533, oneach of host channel adapters.

In accordance with an embodiment, each of the switches 501-504 cancomprise a number of ports (not shown), which are used in setting alinear forwarding table in order to direct traffic within the networkswitched environment 700.

In accordance with an embodiment, the virtual switches 512, 522, and532, can be handled by their respective hypervisors 511, 521, 531. Insuch a vSwitch architecture each virtual function is a complete virtualHost Channel Adapter (vHCA), meaning that the VM assigned to a VF isassigned a complete set of IB addresses (e.g., GID, GUID, LID) and adedicated QP space in the hardware. For the rest of the network and theSM (not shown), the HCAs 510, 520, and 530 look like a switch, via thevirtual switches, with additional nodes connected to them.

In accordance with an embodiment, the present disclosure provides asystem and method for providing a hybrid vSwitch architecture withdynamic LID assignment and prepopulated LIDs. Referring to FIG. 7,hypervisor 511 can be arranged with vSwitch with prepopulated LIDsarchitecture, while hypervisor 521 can be arranged with vSwitch withprepopulated LIDs and dynamic LID assignment. Hypervisor 531 can bearranged with vSwitch with dynamic LID assignment. Thus, the physicalfunction 513 and virtual functions 514-516 have their LIDs prepopulated(i.e., even those virtual functions not attached to an active virtualmachine are assigned a LID). Physical function 523 and virtual function1 524 can have their LIDs prepopulated, while virtual function 2 and 3,525 and 526, have their LIDs dynamically assigned (i.e., virtualfunction 2 525 is available for dynamic LID assignment, and virtualfunction 3 526 has a LID of 11 dynamically assigned as virtual machine 3552 is attached). Finally, the functions (physical function and virtualfunctions) associated with hypervisor 3 531 can have their LIDsdynamically assigned. This results in virtual functions 1 and 3, 534 and536, are available for dynamic LID assignment, while virtual function 2535 has LID of 9 dynamically assigned as virtual machine 4 553 isattached there.

In accordance with an embodiment, such as that depicted in FIG. 7, whereboth vSwitch with prepopulated LIDs and vSwitch with dynamic LIDassignment are utilized (independently or in combination within anygiven hypervisor), the number of prepopulated LIDs per host channeladapter can be defined by a fabric administrator and can be in the rangeof 0<=prepopulated VFs<=Total VFs (per host channel adapter), and theVFs available for dynamic LID assignment can be found by subtracting thenumber of prepopulated VFs from the total number of VFs (per hostchannel adapter).

In accordance with an embodiment, much like physical host channeladapters can have more than one port (two ports are common forredundancy), virtual HCAs can also be represented with two ports and beconnected via one, two or more virtual switches to the external IBsubnet.

Dynamic Reconfiguration with vSwitches

In accordance with an embodiment, the present disclosure provides asystem and method for dynamic network reconfiguration with vSwitches. Ina dynamic cloud environment, live migrations can be handled and can bescalable. When a VM is migrated and has to carry its addresses to thedestination, a network reconfiguration is necessary. Migration of thevirtual or alias GUIDs (vGUIDs), and consequently the GIDs, do not posesignificant burdens as they are high level addresses that do not affectthe underlying IB routing (e.g., linear forwarding tables and routes).For the migration of the vGUID, an SMP has to be sent to the destinationhypervisor in order to set the vGUID that is associated with theincoming VM, to the VF that will be assigned on the VM when themigration will be completed. However, migration of the LID is not sosimple, because the routes have to be recalculated and the LFTs of thephysical switches need to be reconfigured. Recalculation of the routesand distribution needs a considerable amount of time that lies in theorder of minutes on large subnets, posing scalability challenges.

In accordance with an embodiment, a vSwitch has the property that allVFs accessed through the vSwitch share the same uplink with the PF. Atopology agnostic dynamic reconfiguration mechanism can utilize thisproperty to make the reconfiguration viable on dynamic migrationenvironments. The LID reconfiguration time can be minimized byeliminating the path computation and reducing the path distribution. Themethod differs slightly for the two vSwitch architectures discussedabove (prepopulation of LIDs and dynamic LID assignment), but the basisis the same.

In accordance with an embodiment, the dynamic reconfiguration methodincludes two general steps: (a) Updating the LIDs in the participatinghypervisors: one Subnet Management Packet (SMP) is sent to each of thehypervisors that participate in the live migration, instructing them toset/unset the proper LID to the corresponding VF; and (b) Updating theLinear Forwarding Tables (LFTs) on the physical switches: one or amaximum of two SMPs are sent on one or more switches, forcing them toupdate their corresponding LFT entries to reflect the new position of amigrated virtual machine. This is shown more specifically below in theprocedures to migrate a virtual machine and reconfigure a network:

 1: procedure UPDATELFTBLOCK(LFTBlock, Switch)  2:  // If the LFT blockneeds to be updated send SMP on the switch  to  3:  // update theLFTBlock. When Swapping LIDs, 1 or 2 of all  4:  //the LFT Blocks mayneed to be updated per switch. When  copying  5:  // LIDs, only 1 of allthe LFT Blocks may need to be updated  6:  // per switch.  7:  ifLFTBlock in Switch needs to be updated then  8:   Send SMP on Switch toupdate LFTBlock  9:  end if 10: end procedure 11: procedureUPDATELFTBLOCKSONALLSWITCHES 12:  /* iterate through all LFTBlocks onall Switches 13:  * and update the LFTBlocks if needed. */ 14:  forLFTBlock in All_LFTBlocks do 15:   for sw in All_switches do 16:   UPDATELFTBLOCK(LFTBlock, sw) 17:   end for 18:  end for 19: endprocedure 20: procedure MIGRATEVM(VM, DestHypervisor) 21:  Detach IB VFfrom VM 22:  Start live migration of VM to the DestHypervisor 23:   /*Reconfiguration of the network is following */ 24:   // The migrationprocedure of the LID address slightly 25:   // differs in vSwitch withprepopulated LIDs and vSwitch   with dynamic LID assignment. 26:   /*Step described in Updating the LIDs in the participating   hypervisors*/ 27:   Migrate the IB addresses of VM 28:   /* Step described inUpdating the Linear Forwarding Tables   (LFTs) on the physical switches*/ 29:   UPDATELFTBLOCKSONALLSWITCHES 30: end procedure 31: procedureMAIN 32:  MIGRATEVM(VM_to_be_Migrated, toHypervisor) 33: end procedureReconfiguration in vSwitch with Prepopulated LIDs

FIG. 8 shows an exemplary vSwitch architecture with prepopulated LIDsprior to a virtual machine migration, in accordance with an embodiment.As depicted in the figure, a number of switches 501-504 can providecommunication within the network switched environment 800 (e.g., an IBsubnet) between members of a fabric, such as an InfiniBand fabric. Thefabric can include a number of hardware devices, such as host channeladapters 510, 520, 530. Each of the host channel adapters 510, 520, 530,can in turn interact with a hypervisor 511, 521, and 531, respectively.Each hypervisor can, in turn, in conjunction with the host channeladapter it interacts with, setup and assign a number of virtualfunctions 514, 515, 516, 524, 525, 526, 534, 535, 536, to a number ofvirtual machines. For example, virtual machine 1 550 can be assigned bythe hypervisor 511 to virtual function 1 514. Hypervisor 511 canadditionally assign virtual machine 2 551 to virtual function 2 515, andvirtual machine 3 552 to virtual function 3 516. Hypervisor 531 can, inturn, assign virtual machine 4 553 to virtual function 1 534. Thehypervisors can access the host channel adapters through a fullyfeatured physical function 513, 523, 533, on each of host channeladapters.

In accordance with an embodiment, the virtual switches 512, 522, and532, can be handled by their respective hypervisors 511, 521, 531. Insuch a vSwitch architecture each virtual function is a complete virtualHost Channel Adapter (vHCA), meaning that the VM assigned to a VF isassigned a complete set of IB addresses (e.g., GID, GUID, LID) and adedicated QP space in the hardware. For the rest of the network and theSM (not shown), the HCAs 510, 520, and 530 look like a switch, via thevirtual switches, with additional nodes connected to them.

In accordance with an embodiment, each of the switches 501-504 cancomprise a number of ports (not shown), which are used in setting alinear forwarding table, such as linear forwarding table 810 associatedwith switch 501, in order to direct traffic within the network switchedenvironment 800. As shown in the figure, linear forwarding table 810forwards traffic addressed to virtual machine 2 551 (i.e., LID 3)through port 2 of switch 501. Likewise, because paths exist for all LIDseven if VMs are not running, the linear forwarding table can define aforwarding path to LID 12 through port 4 of switch 501.

FIG. 9 shows an exemplary vSwitch architecture with prepopulated LIDsafter a virtual machine migration, in accordance with an embodiment. Asdepicted in the figure, a number of switches 501-504 can providecommunication within the network switched environment 900 (e.g., an IBsubnet) between members of a fabric, such as an InfiniBand fabric. Thefabric can include a number of hardware devices, such as host channeladapters 510, 520, 530. Each of the host channel adapters 510, 520, 530,can in turn interact with a hypervisor 511, 521, and 531, respectively.Each hypervisor can, in turn, in conjunction with the host channeladapter it interacts with, setup and assign a number of virtualfunctions 514, 515, 516, 524, 525, 526, 534, 535, 536, to a number ofvirtual machines. For example, virtual machine 1 550 can be assigned bythe hypervisor 511 to virtual function 1 514. Hypervisor 511 canadditionally assign virtual machine 2 551 to virtual function 2 515, andvirtual machine 3 552 to virtual function 3 516. Hypervisor 531 can, inturn, assign virtual machine 4 553 to virtual function 1 534. Thehypervisors can access the host channel adapters through a fullyfeatured physical function 513, 523, 533, on each of host channeladapters.

In accordance with an embodiment, the virtual switches 512, 522, and532, can be handled by their respective hypervisors 511, 521, 531. Insuch a vSwitch architecture each virtual function is a complete virtualHost Channel Adapter (vHCA), meaning that the VM assigned to a VF isassigned a complete set of IB addresses (e.g., GID, GUID, LID) and adedicated QP space in the hardware. For the rest of the network and theSM (not shown), the HCAs 510, 520, and 530 look like a switch, via thevirtual switches, with additional nodes connected to them.

In accordance with an embodiment, each of the switches 501-504 cancomprise a number of ports (not shown), which are used in setting alinear forwarding table, such as linear forwarding table 910 associatedwith switch 501, in order to direct traffic within the network switchedenvironment 900.

In accordance with an embodiment, if virtual machine 2 551 needs to bemigrated from hypervisor 511 to hypervisor 531, and virtual function 3536 on hypervisor 531 is available, virtual machine 2 can be attached tovirtual function 3 536. In such a situation, the LIDs can swap (i.e.,the entry of the LID that is assigned to the migrating VM can be swappedwith the LID of the VF that is going to be used at the destinationhypervisor after the live migration is completed). The linear forwardingtable 910 on switch 501 can be updated as shown in the figure, namelythat traffic to LID 3 is now forwarded through port 4 (previously port2), and the path to LID 12 is now forwarded through port 2 (previouslyport 4).

In accordance with an embodiment, for vSwitch architecture withprepopulated LIDs, paths exist for all of the LIDs even if VMs are notrunning. In order to migrate a LID and keep the balancing of the initialrouting, two LFT entries on all switches can be swapped—the entry of theLID that is assigned to the migrating VM, with the LID of the VF that isgoing to be used at the destination hypervisor after the live migrationis completed (i.e., the virtual function that the migrating virtualmachine attaches to at the destination hypervisor). In referring againto FIGS. 7 and 8, if VM1 550 with LID 2 needs to be migrated fromhypervisor 551 to hypervisor 531, and VF3 536 with LID 12 on hypervisor531 is available and decided to be attached to the migrating virtualmachine 1 551, the LFTs of the switch 501 can be updated. Before themigration LID 2 was forwarded through port 2, and LID 12 was forwardedthrough port 4. After the migration LID 2 is forwarded through port 4,and LID 12 is forwarded through port 2. In this case, only one SMP needsto be sent for this update because LFTs are updated in blocks of 64 LIDsper block, and both LID 2 and 12 are part of the same block thatincludes the LIDs 0-63. If the LID of VF3 on hypervisor 531 was instead64 or greater, then two SMPs would need to be sent as two LFT blockswould have to be updated: the block that contains LID 2 (the VM LID) andthe block that contains the LID to be swapped that is bigger than 63.

Reconfiguration in vSwitch with Dynamic LID Assignment

In accordance with an embodiment, for the vSwitch architecture withDynamic LID assignment, the path of a VF follows the same path as thepath of the corresponding PF of the hypervisor where the VM is currentlyhosted. When a VM moves, the system has to find the LID that is assignedto the PF of the destination hypervisor, and iterate through all theLFTs of all switches and update the path for the VM LID with the path ofthe destination hypervisor. In contrast to the LID swapping techniquethat is used in the reconfiguration with prepopulated LIDs, only one SMPneeds to be sent at all times to the switches that need to be updated,since there is only one LID involved in the process.

Traditional Cost of Reconfiguration

In accordance with an embodiment, the time, RC_(t), needed for a fullnetwork reconfiguration method is the sum of the time needed for thepath computation, PC_(t), plus the time needed for the LFTsDistribution, LFTD_(t), to all switches, as shown in equation 1:

RC _(t) =PC _(t) +LFTD _(t)  (1)

In accordance with an embodiment, the computational complexity of thepaths is polynomially growing with the size of the subnet, and PC_(t) isin the order of several minutes on large subnets.

After the paths have been computed, the LFTs of the switches in anetwork, such as an IB subnet, can be updated. The LFT distribution timeLFTD_(t) grows linearly with the size of the subnet and the amount ofswitches. As mentioned above, LFTs are updated on blocks of 64 LIDs soin a small subnet with a few switches and up to 64 consumed LIDs, onlyone SMP needs to be sent to each switch during path distribution. Inother situations, where, such as a fully populated IB subnet with 49151LIDs consumed, 768 SMPs per switch are needed to be sent during pathdistribution in a traditional model.

The SMPs can use either directed routing or destination based routing.When using directed routing, each intermediate switch has to process andupdate the headers of the packet with the current hop pointer andreverse path before forwarding the packet to the next hop. In thedestination based routing, each packet is forwarded immediately.Naturally, directed routing can add latency to the forwarded packets.Nevertheless, directed routing is used by OpenSM for all traditionalSMPs. This is necessary for the initial topology discovery process wherethe LFTs have not been distributed yet to the switches, or when areconfiguration is taking place and the routes towards the switches arechanging.

Let n be a number of switches in the network; m the number of all LFTblocks that will be updated on each switch, determined by the number ofconsumed LIDs; k the average time needed for each SMP to traverse thenetwork before reaching each switch; and r the average time added foreach SMP due to the directed routing. Assuming no pipelining, the LFTdistribution time LFTD_(t) can be broken further down in equation 2:

LFTD _(t) =n·m·(k+r)  (2)

By combining equations 1 and 2, equation 3 is a result for the timeneeded for a full network re-configuration:

RC _(t) =PC _(t) +n·m·(k+r)  (3)

In large subnets, traditionally, the time needed for the pathcomputation, PC_(t), is much greater than the time needed for the LFTsdistribution, LFTD_(t), even though the LFTD_(t) becomes larger whenmore LIDs, and consequently more LFT blocks per switch m are used, andwhen more switches n are present in the network. The n·m part inequations 2 and 3 defines the total number of SMPs that needs to be sentfor the reconfiguration.

Reconfiguration Cost for Live Migration with vSwitch Architecture

Using traditional reconfiguration techniques would render VM migrationsunusable. In large subnets, the PC_(t) in equation 3 becomes very largeand dominates RC_(t). If a live migration triggered a full traditionalreconfiguration, it would generally take several minutes to complete.

In accordance with an embodiment, by utilizing the vSwitch withprepopulated LIDs or vSwitch with dynamic LID assignment, the PC_(t)portion of the reconfiguration time can be essentially eliminated sincethe paths are already calculated to swap or copy LID entries in the LFTof each switch. Furthermore, there is no need to send m SMPs per switch,because when a VM is migrated, only one or a maximum of two LIDs areaffected depending on which of the proposed vSwitch schemes is used,regardless of the total number of LFT blocks. As a result, only m′∈{1,2} SMPs are needed to be sent to the switches for each migration (m′=2if the two LID entries are not located in the same LFT block when theLIDs are prepopulated, otherwise m′=1). As well, there are certain casesthat 0<n′<n switches need to be updated.

In accordance with an embodiment, referring now to FIG. 10 which showsan exemplary vSwitch architecture with prepopulated LIDs with potentialvirtual machine migration paths, in accordance with an embodiment. Asdepicted in the figure, a number of switches 501-504 can providecommunication within the network switched environment 1000 (e.g., an IBsubnet) between members of a fabric, such as an InfiniBand fabric. Thefabric can include a number of hardware devices, such as host channeladapters 510, 520, 530. Each of the host channel adapters 510, 520, 530,can in turn interact with a hypervisor 511, 521, and 531, respectively.Each hypervisor can, in turn, in conjunction with the host channeladapter it interacts with, setup and assign a number of virtualfunctions 514, 515, 516, 524, 525, 526, 534, 535, 536, to a number ofvirtual machines. For example, virtual machine 1 550 can be assigned bythe hypervisor 511 to virtual function 1 514. Hypervisor 511 canadditionally assign virtual machine 2 551 to virtual function 2 515, andvirtual machine 3 552 to virtual function 3 516. Hypervisor 531 can, inturn, assign virtual machine 4 553 to virtual function 1 534. Thehypervisors can access the host channel adapters through a fullyfeatured physical function 513, 523, 533, on each of host channeladapters.

In accordance with an embodiment, the virtual switches 512, 522, and532, can be handled by their respective hypervisors 511, 521, 531. Insuch a vSwitch architecture each virtual function is a complete virtualHost Channel Adapter (vHCA), meaning that the VM assigned to a VF isassigned a complete set of IB addresses (e.g., GID, GUID, LID) and adedicated QP space in the hardware. For the rest of the network and theSM (not shown), the HCAs 510, 520, and 530 look like a switch, via thevirtual switches, with additional nodes connected to them.

In accordance with an embodiment, each of the switches 501-504 cancomprise a number of ports (not shown), which are used in setting alinear forwarding table, such as linear forwarding table 1010 associatedwith switch 501, in order to direct traffic within the network switchedenvironment 1000.

In accordance with an embodiment, FIG. 10 depicts a situation in anetwork switched environment 1000 where VM2 551 can potentially migratefrom hypervisor 511 to hypervisor 521 (where there are three availablevirtual functions). If LID 3 was swapped with any of the available LIDsin hypervisor 521 (6, 7 or 8), then the switch 501 would not need to beupdated at all, because the initial routing already routes LID 3 andLIDs 6, 7 and 8 share the same port (port 2) on switch 501. Inparticular for this example n′=1, because only the switch 503 (i.e., aleaf switch) would need to be updated.

In accordance with an embodiment, eventually, the cost vSwitch RC_(t) ofthe disclosed reconfiguration mechanism is found in equation 4, and inlarge subnets, vSwitch RC_(t) is much less than RC_(t).

vSwitch_RC _(t) =n′·m′·(k+r)  (4)

In accordance with an embodiment, destination based routing for the SMPpackets can be used. When VMs are migrated, the routes for the LIDsbelonging to switches will not be affected. Therefore, destination basedrouting can guarantee proper delivery of SMPs to the switches and r canbe eliminated from equation 4, giving equation 5:

vSwitch_RC _(t) =n′·m′·k  (5)

In accordance with an embodiment, pipelining can be used to even furtherreduce the vSwitch reconfiguration time.

Scalable Multi-Homed Routing for vSwitch Based HCA Virtualization

In accordance with an embodiment, when virtual switch (aka vSwitch)based IB HCA virtualization is used, the number of endports in the IBsubnet increases dramatically. This can lead to non-optimal routing ofboth small and large fabric topologies (e.g., InfiniBand FabricTopologies).

In accordance with an embodiment, by identifying vSwitch instances asswitches that only have one port/link connecting to the rest of thefabric, whereas it may have zero or more connections to HCA ports, it ispossible to identify the vSwitch instance as a main endpoint from arouting perspective without any need for proprietary information.

In accordance with an embodiment, by explicitly identifying a specificHCA implementation based on vendor ID and device ID, it is furtherpossible to identify a vSwitch instance without any chance of mistakenlyidentifying a degraded physical switch configuration as a virtual switchinstance.

In accordance with an embodiment, by handling vSwitch instances as theequivalent of HCA ports when performing a routing algorithm on thediscovered topology, it is possible to achieve a level of efficiency andbalancing similar or better than in the case of a subnet containing onlyphysical HCAs.

In accordance with an embodiment, by handling identified vSwitches asequivalent to physical HCA port instances, a fabric consisting of bothpure physical HCAs as well as virtualized HCAs (or only virtualizedHCAs) can, routing wise, be equivalent to a fabric with only physicalHCAs.

In accordance with an embodiment, by keeping track of at least onevirtual HCA instance that connects to two virtual switches, it ispossible to identify “redundant” vSwitches in the same physical HCA andthereby achieve the same level of path independence for paths leading todifferent ports on the same HCA as has been achieved for physical HCAs.

In accordance, systems and methods can provide for independent routesfor multi-homed nodes in fat-trees, so that a single point of failuremay not lead to complete outage. This can proceed when, for example,each vSwitch instance is treated as the equivalent of physical HCA portswhen performing a routing algorithm on the discovered topology.

FIG. 11 shows an illustration of supporting scalable multi-homed routingfor vSwitch based HCA virtualization, in accordance with an embodimentof the invention. As depicted in the figure, a number of switches1101-1104 can provide communication within the network switchedenvironment 1100 (e.g., an IB subnet) between members of a fabric, suchas an InfiniBand fabric. The fabric can include a number of hardwaredevices, such as host channel adapters 1110 and 1120. Each of the hostchannel adapters can in turn interact with a hypervisor 1111 and 1112,respectively. Each hypervisor can, in turn, in conjunction with the hostchannel adapter it interacts with, setup and assign a number of virtualfunctions, such as virtual function 1 1114 and virtual function 2 1124,to a number of virtual machines. For example, virtual machine 1 1150 canbe assigned by the hypervisor 1111 to virtual function 1 1114.Hypervisor 1121 can, in turn, assign virtual machine 2 1151 to virtualfunction 2 1124. The hypervisors can access the host channel adaptersthrough a fully featured physical function 1113 and 1123, respectively,on each of host channel adapters.

In accordance with an embodiment, each of the switches 1101-1104 cancomprise a number of ports (not shown), which are used in setting alinear forwarding table in order to direct traffic within the networkswitched environment 1100.

In accordance with an embodiment, each host channel adapter can beassociated with two or more virtual switches, such a virtual switches1130-1133, which can be handled by their respective hypervisors 1111 and1121. The vSwitches can be handled as the equivalent of HCA ports whenperforming a routing algorithm on the discovered topology. By handlingthe vSwitches in such a manner, it is possible to achieve a level ofefficiency and balancing similar or better that in the case of a subnetcontaining only physical HCAs. In addition, by keeping track of at leastone virtual HCA instance that connects to two virtual switches, it ispossible to identify “redundant” vSwitches in the same physical HCA andthereby achieve the same level of path independence for paths leading todifferent ports on the same HCA as has been achieved for physical HCAs.

In accordance with an embodiment of the invention, a multi-homedfat-tree routing mechanism, such as the mFtree mechanism described inU.S. patent application entitled “SYSTEM AND METHOD FOR SUPPORTINGMULTI-HOMED FAT-TREE ROUTING IN A MIDDLEWARE MACHINE ENVIRONMENT”,application Ser. No. 14/226,288, filed Mar. 26, 2014, can be used forperforming the fat-tree routing while treating the vSwitch instances asthe physical “ports” on the HCAs.

In accordance with an embodiment, the mFtree mechanism can ensure thatcalculated paths are redundant (meaning that if a switch, for example aspine switch, were to go down, communication with the HCA via thevirtual switches would not be lost). For example, a path from thevirtual switch 1130 associated with HCA 1110 can go through leaf switch1103 and eventually through switch 1101. When making such calculation,the mechanism can mark the switches in the calculated path. Themechanism can avoid using the marked switches for determining the pathfrom virtual switch 1131 on HCA 1110. Thus, the path from virtual switch1131 on HCA 1110 can be routed through a redundant path via, e.g., leafswitch 1104 and switch 1102.

In accordance with an embodiment, after the calculation of the route forvirtual switches 1130 and 1131 has completed, the mechanism can mark thevirtual switches as routed so that the routing step is not repeated whenthe mechanism encounters another port of that node. Thus, the mechanismcan ensure that a single point of failure does not lead to a completeoutage of a multi-port node.

In accordance with an embodiment, the mechanism can iterate over allleaf switches, and then can iterate over all leaf switch ports for eachleaf switch. Thus, the mechanism can be deterministic.

In accordance with an embodiment, the mechanism can take a switch porton a leaf switch in order to find an end node that is associated withthe switch port, and can take the virtual switch as a parameter forperforming the routing calculation.

In accordance with an embodiment, the mechanism can iterate over allvirtual switches on a selected HCA. When all virtual switches on theselected HCA are routed, the routing mechanism can mark the selected HCAas routed so that the HCA is not routed when it is encountered onanother leaf switch. Also, the mechanism can improve the performance ofthe system in various situations (For example, the mechanism can savehalf of the loop iterations for a two virtual switch HCA).

In accordance with an embodiment, the mechanism may be applied to both ascenario with multiple virtual switches on a single host channel adapter(HCA) and a scenario with multiple virtual switches on two or more HCAs.The mechanism can use different methods for identifying virtual switcheson the single HCA or on multiple HCAs on the same logical node.

In accordance with an embodiment, the mechanism can treat redundancy asa primary consideration. The mechanism can choose an upward node of anHCA as the next-hop if it does not route any other ports belonging tothe end-node (i.e., when the redundant flag is true).

In accordance with an embodiment, a multi-homed routing mechanism canroute a subnet utilizing vSwitch based HCA virtualization in such a waythat the paths to each virtual switch on a HCA are exclusive, i.e., themechanism can ensure each vSwitch on a HCA having two or more virtualswitches is reachable through an independent path.

Furthermore, in the case of a single multi-homed HCA, the mechanism canensure that no single link is shared by paths to any pair of virtualswitches belonging to the same end node. Also, when there is concurrenttraffic from different source ports to different virtual switches on thesame destination HCA in the network fabric, the mechanism can ensurethat the concurrent traffic is not sharing any intermediate link when analternative route exists.

Thus, in accordance with an embodiment, using such a routing mechanismcan ensure that a failure of a single device, such as the spine switch1101 in the fabric, may not cause the node HCA 1110 to be disconnected,because the paths to the different virtual switches do not converge atthe single spine switch 1101.

Additionally, in accordance with an embodiment, the mechanism can treateach port on a same HCA as a separate and independent entity (e.g.,identified by vendor and device ID). Thus, the mechanism can route on aHCA-basis instead of on a vSwitch-basis, and the mechanism can addressthe different characteristics that different end HCAs may have.

In accordance with an embodiment, in order to minimize the time neededfor setting up LID routing towards the various vHCA ports, the routingfor the LID associated vSwitch instance can be copied for the LIDassociated with the vHCA port.

In accordance with an embodiment, the copying of the routing can beachieved by looking up the forwarding table entry for the vSwitch LID inall physical switches (after the routing has been completed) and thencopying the relevant switch port number to the forwarding table entryfor the LID of the vHCA port.

FIG. 12 is a flow chart of a method for supporting scalable multi-homedrouting for virtual switch based host channel adapter (HCA)virtualization in a subnet, in accordance with an embodiment. At step1210, the method can provide, at one or more computers, including one ormore microprocessors, one or more switches, the one or more switchescomprising at least a leaf switch, wherein each of the one or moreswitches comprise a plurality of ports; a plurality of host channeladapters, wherein one or more of the plurality of host channel adapterscomprise at least one virtual function, and wherein the plurality ofhost channel adapters are interconnected via the one or more switches; aplurality of hypervisors, wherein each of the one or more hypervisorsare associated with at least one host channel adapter of the one or morehost channel adapters that comprise at least one virtual function; and aplurality of virtual machines, wherein each of the plurality of virtualmachines are associated with at least one virtual function.

At step 1220, the method can arrange the plurality of host channeladapters that comprise at least one virtual function with one or more ofa virtual switch with prepopulated local identifiers (LIDs) architectureor a virtual switch with dynamic LID assignment architecture.

At step 1230, the method can perform a multi-homed routing for thesubnet; wherein at least one of the plurality of host channel adaptersthat comprise at least one virtual function comprises two virtualswitches, wherein the two virtual switches are treated as endpoints ofthe subnet; and wherein the multi-homed routing for the subnet ensuresthat each the two virtual switches are routed through independent paths.

The present invention may be conveniently implemented using one or moreconventional general purpose or specialized digital computer, computingdevice, machine, or microprocessor, including one or more processors,memory and/or computer readable storage media programmed according tothe teachings of the present disclosure. Appropriate software coding canreadily be prepared by skilled programmers based on the teachings of thepresent disclosure, as will be apparent to those skilled in the softwareart.

In some embodiments, the present invention includes a computer programproduct which is a storage medium or computer readable medium (media)having instructions stored thereon/in which can be used to program acomputer to perform any of the processes of the present invention. Thestorage medium can include, but is not limited to, any type of diskincluding floppy disks, optical discs, DVD, CD-ROMs, microdrive, andmagneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flashmemory devices, magnetic or optical cards, nanosystems (includingmolecular memory ICs), or any type of media or device suitable forstoring instructions and/or data.

The foregoing description of the present invention has been provided forthe purposes of illustration and description. It is not intended to beexhaustive or to limit the invention to the precise forms disclosed.Many modifications and variations will be apparent to the practitionerskilled in the art. The embodiments were chosen and described in orderto best explain the principles of the invention and its practicalapplication, thereby enabling others skilled in the art to understandthe invention for various embodiments and with various modificationsthat are suited to the particular use contemplated. It is intended thatthe scope of the invention be defined by the following claims and theirequivalents.

What is claimed is:
 1. A system for supporting multi-homed routing forvirtual switch based host channel adapter (HCA) virtualization,comprising: one or more microprocessors; and a subnet comprising: aplurality of switches, a host channel adapter comprising at least twovirtual switches; wherein a subnet management component of the subnetcalculates a routing for the subnet; wherein the subnet managementcomponent, in calculating the routing for the subnet, handles each ofthe at least two virtual switches as physical host channel adapter portsof the host channel adapter.
 2. The system of claim 1, wherein thecalculation of the routing for the subnet results in exclusive andindependent routes for each of the at least two virtual switches of thehost channel adapter.
 3. The system of claim 2, wherein the host channeladapter comprises a plurality of virtual functions.
 4. The system ofclaim 3, wherein at least two of the virtual functions of the hostchannel adapter are utilized for connecting at least two virtualmachines to the subnet.
 5. The system of claim 4, wherein each of the atleast two virtual machines are connected to both of the at least twovirtual switches within the host channel adapter.
 6. The system of claim1, wherein the subnet management component, in calculating the routingfor the subnet, ensures that a failure of a switch of the plurality ofswitches does not cause a drop in communication with the host channeladapter.
 7. The system of claim 1, wherein each of the at least twovirtual switches are identified within the subnet by a vendoridentification and a device identification of the host channel adapter.8. A method for supporting multi-homed routing for virtual switch basedhost channel adapter (HCA) virtualization, comprising: providing, at oneor more computers, including one or more microprocessors, a subnet, thesubnet comprising: a plurality of switches, and a host channel adaptercomprising at least two virtual switches; calculating, by a subnetmanagement component of the subnet, a routing for the subnet; whereinthe subnet management component, in calculating the routing for thesubnet, handles each of the at least two virtual switches as physicalhost channel adapter ports of the host channel adapter.
 9. The method ofclaim 8, wherein the calculation of the routing for the subnet resultsin exclusive and independent routes for each of the at least two virtualswitches of the host channel adapter.
 10. The method of claim 9, whereinthe host channel adapter comprises a plurality of virtual functions. 11.The method of claim 10, wherein at least two of the virtual functions ofthe host channel adapter are utilized for connecting at least twovirtual machines to the subnet.
 12. The method of claim 11, wherein eachof the at least two virtual machines are connected to both of the atleast two virtual switches within the host channel adapter.
 13. Themethod of claim 8, wherein the subnet management component, incalculating the routing for the subnet, ensures that a failure of aswitch of the plurality of switches does not cause a drop incommunication with the host channel adapter.
 14. The method of claim 8,wherein each of the at least two virtual switches are identified withinthe subnet by a vendor identification and a device identification of thehost channel adapter.
 15. A non-transitory computer readable storagemedium, including instructions stored thereon for supporting multi-homedrouting for virtual switch based host channel adapter (HCA)virtualization in a subnet which when read and executed by one or morecomputers cause the one or more computers to perform steps comprising:providing, at one or more computers, including one or moremicroprocessors, a subnet, the subnet comprising: a plurality ofswitches, and a host channel adapter comprising at least two virtualswitches; calculating, by a subnet management component of the subnet, arouting for the subnet; wherein the subnet management component, incalculating the routing for the subnet, handles each of the at least twovirtual switches as physical host channel adapter ports of the hostchannel adapter.
 16. The non-transitory computer readable storage mediumof claim 15, wherein the calculation of the routing for the subnetresults in exclusive and independent routes for each of the at least twovirtual switches of the host channel adapter.
 17. The non-transitorycomputer readable storage medium of claim 16, wherein the host channeladapter comprises a plurality of virtual functions.
 18. Thenon-transitory computer readable storage medium of claim 17, wherein atleast two of the virtual functions of the host channel adapter areutilized for connecting at least two virtual machines to the subnet. 19.The non-transitory computer readable storage medium of claim 18, whereineach of the at least two virtual machines are connected to both of theat least two virtual switches within the host channel adapter.
 20. Thenon-transitory computer readable storage medium of claim 15, wherein thesubnet management component, in calculating the routing for the subnet,ensures that a failure of a switch of the plurality of switches does notcause a drop in communication with the host channel adapter.